#!/bin/bash

echo "启动后台管理系统..."
echo

echo "1. 启动后端服务..."
cd backend/src/Eno.Api
gnome-terminal --title="Backend API" -- bash -c "dotnet run; exec bash" &
cd ../../..

echo "2. 等待后端服务启动..."
sleep 5

echo "3. 启动前端服务..."
cd frontend/magager-eno
gnome-terminal --title="Frontend Dev Server" -- bash -c "pnpm dev; exec bash" &
cd ../..

echo
echo "服务启动完成！"
echo "后端服务: http://localhost:5284"
echo "前端服务: http://localhost:5173"
echo
echo "按任意键退出..."
read -n 1 